<html>
<head><meta charset="utf-8"><title>how to use worktrees · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/how.20to.20use.20worktrees.html">how to use worktrees</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="210146897"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/how%20to%20use%20worktrees/near/210146897" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gus Wynn <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/how.20to.20use.20worktrees.html#210146897">(Sep 15 2020 at 15:40)</a>:</h4>
<p>Hey I'm a little confused about worktrees<br>
<a href="https://rustc-dev-guide.rust-lang.org/building/suggested.html">https://rustc-dev-guide.rust-lang.org/building/suggested.html</a> says that i can do<br>
git worktree add ../rust2<br>
and git worktree add -b feature ../rust2 master</p>
<p>if I ran the first one, how do I add new features in the worktree? do I just do<br>
cd ../rust2<br>
and then do normal git checkout -b?</p>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> you may be interested as you want to write a git guide</p>



<a name="210146984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/how%20to%20use%20worktrees/near/210146984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/how.20to.20use.20worktrees.html#210146984">(Sep 15 2020 at 15:40)</a>:</h4>
<p>yup! in <code>rustc2</code> you treat it like a normal git repository</p>



<a name="210147050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/how%20to%20use%20worktrees/near/210147050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gus Wynn <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/how.20to.20use.20worktrees.html#210147050">(Sep 15 2020 at 15:41)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/how.20to.20use.20worktrees/near/210146984">said</a>:</p>
<blockquote>
<p>yup! in <code>rustc2</code> you treat it like a normal git repository</p>
</blockquote>
<p>sweeet. great way to save on compile times</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>